home *** CD-ROM | disk | FTP | other *** search
- /******************************************************/
- /* */
- /* CBrowserDoc.h */
- /* */
- /* Classes for Browser documents */
- /* */
- /* Written in Think C version 4.0.2 */
- /* Based on CStarterDoc.h */
- /* */
- /* Allen Stenger January 1991 */
- /* */
- /******************************************************/
-
- #define _H_CBrowserDoc
- #include <CDocument.h>
- #include <CApplication.h>
-
- struct CBrowserDoc : CDocument {
-
- /* instance variables */
-
- /* **itsDataH and **itsLineStartsH are shared with */
- /* CBrowserPane, which uses them to update the */
- /* window contents and to control scrolling */
- char **itsDataH; /* handle to itsFile's data */
- short itsLineCt;
- /* number of lines in **itsDataH */
- long **itsLineStartsH;
- /* Handle to line starts table - defined by */
- /* (*itsLineStartsH)[i] = */
- /* offset to start of line i */
- /* for i=0 to i=itsLineCt-1, and as the size of */
- /* **itsDataH for i=itsLineCt (or 1 if no data) */
- long itsFindOffset;
- /* offset of last found instance of search string */
- /* in **itsDataH, or -1 if none */
-
- /* Methods - same function as CStarterDoc, except */
- /* as noted */
-
- void IBrowserDoc(CApplication *aSupervisor,
- Boolean printable);
- void Dispose(void);
- void FindIt(long offset);
- /* Internal function to find next occurence of */
- /* string. Search begins "offset" into the text. */
- /* If found, the window is scrolled to put the */
- /* found line at the top, and itsFindOffset is */
- /* updated to the offset to the found substring. */
- void DoCommand(long theCommand);
- /* DoCommand processes the Search menu */
- void UpdateMenus(void);
- /* UpdateMenus processes the Search menu - Find */
- /* is always enabled, and Find Again is enabled */
- /* if a search string has been entered in Find */
- void OpenFile(SFReply *macSFReply);
- void BuildWindow(Handle theData);
- };
-